package com.yc.bdw.Utils;

import java.util.HashMap;

/**
 * 基于进程的内存缓存
 * Created by icefairy on 2015-10-15.
 */
public class mCache {
    private static HashMap<String,Object> che=null;
    public static mCache memche=null;
    public static mCache getCache(){
        if (memche==null){
            memche=new mCache();
        }
        return memche;
    }
    public mCache() {
       che=new HashMap<String, Object>();
    }
    public Object get(String key){
        return che.get(key);
    }
    public void set(String key,Object val){
        che.put(key, val);
    }
    public boolean containsKey(String key){
        return che.containsKey(key);
    }
    public boolean containsKeyf(String val){
        return che.containsValue(val);
    }
    public int size(){
        return che.size();
    }
}
